#coding:utf-8

import psutil
from . import Config
from xmlrpc.client import ServerProxy

def getSysInfo(port):
    mem = psutil.virtual_memory()
    info = {'cpu_count':psutil.cpu_count(logical=False),'mem_total':mem.total,'port':port}
    return info


if __name__ == "__main__":
    server = ServerProxy("http://" + Config.SERVER_HOST + ":" + Config.SERVER_PORT + "/", allow_none=True)

    server.regist(getSysInfo(Config.SERVER_PORT))


